|
Night Shade posted:This is correct behaviour. Belated thank you! That makes sense. I had assumed that an exception meant I was doing something wrong, but if it's the normal state of affairs here that's fine.
|
# ? Jun 15, 2013 21:37 |
|
|
# ? Jun 4, 2024 14:59 |
|
Ithaqua posted:... but there's no reason to not be using VS2012 Express, which does. ... Right now I tried the "web instal" on my desktop and it's only 1/3 finished after ~45 minutes.... ??? What did manage to download and install before I cancelled out is all stuff for C++ and SQL. I may try the "CD" icon later I guess..... Anyway--I made a new project (using the default VB.net location) and added in all the forms from the other one. I had used some lineshapes on one form and it had a bunch of errors about them?? So I commented them out in the designer file, and there is no errors at all now. But when I run it, the immediates window only says this: code:
I also cannot get breakpoints or messageboxes to work... if I put them in the main form's load event, they don't work anymore? [edit]...... god dammit. Nevermind, it works now. :| I had a module with some global variables, and in the sub that inits them I had moved a loop to set the values to a default value. For some reason that was causing an error that the VB.net IDE would not halt on, or even give any info on. When I just tried running the plain EXE file, the OS gave an error message that says the files and line numbers where it occurred. edmund745 fucked around with this message at 22:12 on Jun 15, 2013 |
# ? Jun 15, 2013 21:56 |
|
So, what are you using for source control now?
|
# ? Jun 16, 2013 02:14 |
|
Ithaqua posted:So, what are you using for source control now? At this point I'm just happy that the newer version (of my program) still works. Because of what I was changing I had to do a large amount of changes before the program could be test-run at all. --- It is odd that it choked on the Lineshapes though. In all the imported forms that I had used lineshapes in, they were all identified as errors in the form designer file.
|
# ? Jun 16, 2013 13:41 |
|
edmund745 posted:Nothing, really. You should probably stop what you're doing and set up some source control. Right now. It will literally solve all your problems without you having to do hacky poo poo like what you're trying to do now. It will take less effort than what you're currently trying to do, and will work better. Why are you not using source control?
|
# ? Jun 16, 2013 13:50 |
|
Jabor posted:... Why are you not using source control? I have an assoc degree in Comp sci that I got back in the year 2002, but never ended up working in the industry or going any farther. A lot of stuff I don't know about because I didn't have to do it in school. plus I learned on VB6... Some things are different now. Some easy things got difficult, and some things that were difficult back then are easy now. ---- Another question: is the exe in the bin\debug folder the same thing as what you get if you publish & install the same program? More specifically, can the installed exe be copied to another computer and run, or is there anything inside it tying it to its original installed location? (in this case I am only using the vb express publisher, that put it into { ... user\appdata\local\apps\2.0\ ... } ?)
|
# ? Jun 16, 2013 14:32 |
|
edmund745 posted:I didn't know about it, Okay, fine. So why are you not using source control now?
|
# ? Jun 16, 2013 17:59 |
|
Ithaqua posted:Okay, fine. So why are you not using source control now?
|
# ? Jun 17, 2013 03:04 |
|
edmund745 posted:the issue of rolling back to previous versions hasn't really been significant, yet Fixed that for you. I realize as a lone developer (even a hobbyist), the benefits might not be obvious to you yet, but you've already started copying and renaming entire projects. As you can see, instead of trying to solve your weird project renaming issue, we're pointing out that you wouldn't have the issue in the first place if you were using source control. I found http://hginit.com a good read when I was jumping into distributed version control. Read that, and it should shed some light on how you can use source control to help you in the long run.
|
# ? Jun 17, 2013 03:31 |
|
Thanks for that link. I'm an SVN user and also generally a hobbyist that's pretty stubborn about changing and that guide really excited me to try out Mercurial. To edmund745, don't take things too deeply that you are ALL WRONG. I grew up using arcane ways of doing my own source control prior to SVN and what you are doing is not bad if you are a hobbyist only or just learning. Put it this way: By doing what you are doing now, you are learning why source control was created and why it is better. It's a tool plain and simple. It will make your life way easier though and you'll laugh at the times before you were using it. quick edit: In a nutshell, source control is management of your project versions/files/etc. It isn't magic programming stuff like I used to think. It's just a way to maintain a "working directory" with "copies" or "versions" available to switch between or branch off of. A Visual Studio project likes to be organized and have a home. The moment you start toying with it's home or things inside it's home without it's express permission or supervision you risk making it very angry. By using source control you can keep it's home where it is and it will be comfy. Source control gives you the ability to time travel and the project will never know you are leaping through time and alternate universes totally playing God with it's life. muhahahaha - (obligatory laugh when saying "playing God") That said, learn the difference between debug builds and production/release builds and why there are the extra files in the debug folder (hint: "build /debug"). Then learn how you can make your own build folders for different purposes even if you will not be doing anything beyond the standard debug or release versions with your projects. Then, learn how publishing in VS is more than just a 'build' (hint: think "packaging" or "distribution") and why it is in the local user apps folder instead of somewhere else. Get this crap out of the way before you start any more projects. Otherwise you'll face the same regret I did. crashdome fucked around with this message at 04:51 on Jun 17, 2013 |
# ? Jun 17, 2013 04:42 |
|
Any time you're working with a project that you aren't planning on deleting immediately, you should be using source control. Personally, I recommend git.
|
# ? Jun 17, 2013 15:06 |
|
Dietrich posted:Any time you're working with a project that you aren't planning on deleting immediately, you should be using source control. I still find Git confusing, and I haven't had a need to get over that hurdle yet. For someone just getting started with source control, something that integrates seamlessly with the IDE might be better. Git, TFS, SVN, even (*shudder*) CVS or VSS. Any of those are better than nothing.
|
# ? Jun 17, 2013 15:12 |
|
Ithaqua posted:I still find Git confusing, and I haven't had a need to get over that hurdle yet. For someone just getting started with source control, something that integrates seamlessly with the IDE might be better. VSS is worse than nothing.
|
# ? Jun 17, 2013 15:39 |
|
GREAT NEWS!! I finally got VS 2012 Express installed. It only took three tries, too. :) You (may) know how the web installer downloads for a long time, and then it installs [stuff], and then says "reboot to finish installation"? Well when I rebooted, the installer wouldn't start up again. And I couldn't figure out any way to find the file to try restarting it myself. But on the third attempt (at web installing) it skipped downloading all the stuff (unlike the second time, that it spend ~2 hours re-downloading ~700 megs) and it also skipped saying "you need to reboot your sh!t". It just said "installation finished". Also VB Express 2010 is still there, I was kinda afraid it would remove that. I think when I downloaded VB Express, there was no free version of VisStudio posted at the time. I do recall searching for it, but there was only links to the versions you had to pay for. VS2012: the 'white look' is too drat white for my monitor, and the 'black look' is better but makes me feel like an extra on "CSI". :| oh well. Source control, nope. Maybe some other time. --------- If you are particularly knowledgeable about VB: where should a public variable on a module be initialized? Does it need to be in the main form load() event? I am using a few globals. Well, more than a few really. Quite an astonishing amount, quite frankly. Yea I know. But anyway. (Mostly) works for me. I declared them on a module, and then made init subs on the module, and called the init subs in the form load event. This has worked 100% perfectly, up until now. Out of several hundred global variables, there is (now) ONE that will not init correctly! One f*cking array. One array that is declared in the middle of 100 others, and init'd in the middle of 100 others in the init() sub.... I have verified this issue, by using messageboxes that get the ubounds during runtime. So, I copied that ONE redim line for that ONE array, and pasted it onto the actual form_load() event,,,,,,, and from there it works perfectly fine. Should all those init/redim statements be put onto the form load? I can't find anywhere online that says this. Lots of people ask how to make a global in VB, and lots of places give the "public variable on a module" answer, but I can't find anything about where the variable's initialization should be.
|
# ? Jun 17, 2013 16:27 |
|
At this point, I'm starting to think you're trolling us. On the off chance that you aren't. Modules should not be used. Use classes instead. Global variables should not be used. Ever. Arrays should only be used if you're never going to resize them. If you need array like access via index/key then consider a dictionary(of int, whatever). You should be using source control. This isn't VB6. While you can work with it as though it is, there are much better ways to do things now. You will save yourself time and money, and save the sanity of the person who works on your poo poo after you move on by not trying to treat vb.net as though it is vb6.
|
# ? Jun 17, 2013 16:37 |
|
edmund745 I'll make the suggestion of stop learning VB.NET. Like Dietrich said you are trying to treat VB.NET like it's VB6, but VB.NET is a whole new beast to work with that has it's own patterns and ways of doing things. I'd suggest re-working your code in C# and learning C#. The different syntax should help your brain from not writing VB6 code in .NET to some degree. Are you using any outside help (tutorials, books, etc) to help pickup .NET programming? If you want help with you current program try sharing your code someplace so people can see what you mean. All I can tell from your explanation is that your architecture is "wrong" but it's hard to give direction without seeing it. This is another place source control can be useful. Posting it on Github as a public repo can let other people see it.
|
# ? Jun 17, 2013 17:23 |
|
I take my earlier comment back. Also, drop VB6 from your memory as quickly as you can. Take it from someone who is used to converting VB6 apps to C#. VB6 is old, disgusting, and I wish I never had to see another VB6 source file again. If you are trying to convert an app, you'll have to start ground up. It's the only way to stay sane.
|
# ? Jun 17, 2013 18:31 |
|
Dietrich posted:This isn't VB6. While you can work with it as though it is, there are much better ways to do things now. There were much better ways of doing things in VB6, too. Not as many, not as good, but nonetheless, lots of modules and globals were still bad in VB6. (I've only ever encountered one scenario where globals and modules were outright required, with WinAPI window handler hooks).
|
# ? Jun 17, 2013 18:46 |
|
If you were using version control, it would be trivial to find out which change suddenly made your program stop working.
|
# ? Jun 18, 2013 02:14 |
|
I've wondered about this for a while. Is this genuinely useable for a real project or is it just a toy? I mostly use C# at work but I have a Mac at home; it'd probably be easier to get myself writing more C# if I had the motivation of being able to use what I'm writing at home.
|
# ? Jun 18, 2013 03:19 |
|
RICHUNCLEPENNYBAGS posted:I've wondered about this for a while. Is this genuinely useable for a real project or is it just a toy? I mostly use C# at work but I have a Mac at home; it'd probably be easier to get myself writing more C# if I had the motivation of being able to use what I'm writing at home. Oh, it's quite serious.
|
# ? Jun 18, 2013 04:03 |
|
I'm using WPF and adding a bunch of controls to a window dynamically using C#. I've discovered that in Windows 8, ComboBox controls do not render properly. For example, if I set each control's BorderBrush property to Brushes.Red, it works fine in Windows 7 and below (i.e. the controls all have a red border), but in Windows 8, every control except a ComboBox has a red border (for what it's worth, the ComboBox's IsEditable property is true, but that's not a problem for Windows 7 ...). Has anyone encountered anything like this, or know of a workaround? I found one website that said "Simply extracting the template for the combobox ... WITHOUT making any changes and set it as style fixes the issue on windows8", but whenever I do that, the combobox's template is null.
|
# ? Jun 18, 2013 08:24 |
|
RICHUNCLEPENNYBAGS posted:I've wondered about this for a while. Is this genuinely useable for a real project or is it just a toy? I mostly use C# at work but I have a Mac at home; it'd probably be easier to get myself writing more C# if I had the motivation of being able to use what I'm writing at home. It implements nearly all of .NET 4, with most noticeable missing feature being WPF. http://www.mono-project.com/Compatibility
|
# ? Jun 18, 2013 10:46 |
|
RICHUNCLEPENNYBAGS posted:I've wondered about this for a while. Is this genuinely useable for a real project or is it just a toy? I mostly use C# at work but I have a Mac at home; it'd probably be easier to get myself writing more C# if I had the motivation of being able to use what I'm writing at home. To pile on here -- very much so yes. Especially in mobile, Miguel and his guys have done an awesome job of building native quality tools in much cleaner languages without having any of the horrors of other wrappers. They are writing some games using monotouch -- and games are typically the last thing you see in emulators.
|
# ? Jun 18, 2013 13:23 |
|
RICHUNCLEPENNYBAGS posted:I've wondered about this for a while. Is this genuinely useable for a real project or is it just a toy? I mostly use C# at work but I have a Mac at home; it'd probably be easier to get myself writing more C# if I had the motivation of being able to use what I'm writing at home. I have followed Miguel de Icaza ever since he was on This Developer's Life and I enjoy his work. His latest project, xamarin, is quite useful. I am writing an iOS and Android app on my MacBook Air using c# for my church, and already have offers for contract work when I finish this rinky dink church app. This video made me smile, c# really is a satisfying language to use: http://xamarin.com/evolve/2013#session-umfpnw90c9 Dirk Pitt fucked around with this message at 14:37 on Jun 18, 2013 |
# ? Jun 18, 2013 14:34 |
|
I have a method that iterates over the controls within a group box and does a particular function based on the control's type (ie combobox / textbox). However, some of the textboxes represent a range of data. I don't want to have to hardcode the method to do something like this;code:
code:
I found this Like operator on the MSDN, but it doesn't seem to exist in my application's .NET version edit; I suppose I could use some sort of LastIndexOf witchery to see if Upper/Lower is part of the control name? Sab669 fucked around with this message at 16:45 on Jun 18, 2013 |
# ? Jun 18, 2013 16:37 |
|
Sab669 posted:I have a method that iterates over the controls within a group box and does a particular function based on the control's type (ie combobox / textbox). However, some of the textboxes represent a range of data. I don't want to have to hardcode the method to do something like this; if (c.Name.EndsWith('Lower')) or even .Contains('Lower') is probably your best bet. (C#, but guessing the VB string class has similar functionality) Not the fanciest design though, I'ld probably pick a less arcane way and errorprone way to do stuff like this (like a Dictionary<Control,Action> mapping and iterate across that)
|
# ? Jun 18, 2013 16:45 |
|
Well that's embarassing, I forgot Contains even exists I don't use it much. Definitely not the cleanest though, as you said.
|
# ? Jun 18, 2013 16:53 |
|
I'd make an IActionable interface and set each Actionable control's action when it's initialized. Then I can just get all of my IActionables and run their actions. off the top of my head: code:
code:
New Yorp New Yorp fucked around with this message at 17:30 on Jun 18, 2013 |
# ? Jun 18, 2013 17:26 |
|
I did something similar with a SetFloat Delegate and a Dictionary<TextBox, SetFloat> dict. Common controls for all the TextBoxes, but if any of them need their own specific handler that doesn't match the Delegate template it's more clunky code to check for particulars like you noted.
|
# ? Jun 18, 2013 18:11 |
|
Cat Plus Plus posted:It implements nearly all of .NET 4, with most noticeable missing feature being WPF. http://www.mono-project.com/Compatibility It's missing a bunch of WCF parts as well though that's rapidly becoming a moot point with Web API being the new MS thing. I've also found MonoDevelop/Xamarin Studio to be pretty rough around the edges but there's basically nothing in the IDE universe that compares to VS so that's not particularly surprising. Given your alternative on OS X is Xcode and Objective-C/C/C++ it's certainly not a bad way to go. Their strengths are really in cross-platform and mobile and that's where most of their attention lies. I've found it to be just an ok replacement for the complete Windows .NET toolchain regarding desktop or web services. Dr Monkeysee fucked around with this message at 19:41 on Jun 18, 2013 |
# ? Jun 18, 2013 19:37 |
|
Can someone point me to a good guide on using a Canvas to actually do useful things? Every trivial little introduction I can find pretty much just shows how to use static XAML to draw stick figures having sex, but I want my Canvas content to actually depend on real things. I guess this means I need to data-bind it to something? But what! And how!
|
# ? Jun 19, 2013 00:50 |
|
Is there any way you can override the mouse click event in Windows? I want to make an app that will sit in the taskbar and give me the coordinate of the current location of the mouse cursor when clicked, but without activating whatever is beneath the cursor. I suppose if this is not possible, I could make a full screen transparent app that will sit on top of every other window, and will prevent clicks from going through.
|
# ? Jun 19, 2013 00:52 |
|
Pseudo-God posted:Is there any way you can override the mouse click event in Windows? I want to make an app that will sit in the taskbar and give me the coordinate of the current location of the mouse cursor when clicked, but without activating whatever is beneath the cursor. I suppose if this is not possible, I could make a full screen transparent app that will sit on top of every other window, and will prevent clicks from going through.
|
# ? Jun 19, 2013 01:02 |
|
Longshot question: I'm transitioning some folks from VS2005 (!!!) web deployment projects (.wdproj) to VS2012 publishing profiles. Anyone ever integrate publishing profiles with MSBuild before?
|
# ? Jun 19, 2013 14:47 |
|
This is how we do it in team city. /p:VisualStudioVersion=11.0 /p:Configuration=Test /p:OutputPath=bin /p:DeployOnBuild=True /p:DeployTarget=MSDeployPublish /p:MsDeployServiceURL=https://{WEBSITE ADDRESS}/msdeploy.axd /p:username={SOME ACCOUNT NAME HERE} /p:password={SOME PASSWORD HERE} /p:AllowUntrustedCertificate=True /p:DeployIisAppPath={IIS APP NAME} /p:MSDeployPublishMethod=WMSVC
|
# ? Jun 19, 2013 15:32 |
|
Does anyone know of a good, dead-simple replacement for Crystal Reports or SQL Server Reporting Services to service a web farm hosting an MVC app? We need to generate PDF and Excel files for invoices, faxes and so on. We're using Crystal Reports for VS2008 (only 2 !!s, but still lol) right now and only one person on our team knows how to use it and hates it, (not me) so that's out. I remember a surface level discussion in this thread and liking the idea of writing HTML to generate reports. I'm not sure how to get that to various formats though. Parameterization is another problem I figure is already solved as well. Any tool suggestions?
|
# ? Jun 19, 2013 18:57 |
|
There are many .net PDF creation libraries (PDFSharp, ITextSharp) which will take html and turn it into a PDF. I would recommend that approach for the PDF reports. Excel is kinda a different question, do you want .xls or .xlsx? Most of the libs I've found support either one or the other, but not both. I've had good experiences with MyXls.SL2 for .xls documents.
|
# ? Jun 19, 2013 19:07 |
|
Dietrich posted:There are many .net PDF creation libraries (PDFSharp, ITextSharp) which will take html and turn it into a PDF. I would recommend that approach for the PDF reports. Any experience with .xlsx? Is there any reason to use it aside from specifically targeting newer version of Excel?
|
# ? Jun 19, 2013 19:38 |
|
|
# ? Jun 4, 2024 14:59 |
|
Dear god yes. The excel file format is a nightmare at best -- see this blog post for some details*. From a managed code point of view you are looking at either expensive libraries or using some nightmare of Excel running on your web server to generate files. XSLX is a more modern format in many ways. From a managed code perspective the key feature is that .XSLX, like all the ???x office formats, is just a zipped set of XML files and assets which means they are easily accessible from purely managed code without a need for 3rd party extensions or running client apps on your server. At this point they have been out since 2007 so just about everyone either has upgraded office or at least installed the compatibility pack so they can read the formats. * I would typically never endorse anything Splosky wrote, but this happens to be one of the few good blog posts in the sea of poo he has written. I'll add he might well be partially responsible for the nightmare of the file formats as he was PM of Excel in 1991 or so.
|
# ? Jun 19, 2013 21:26 |