Nerseus
*Experts*-
Posts
2607 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nerseus
-
It may work with Netscape 6 or higher, but I'd test it yourself. You can install Netscape side-by-side with IE to test on though you can't have Netscape 6 and Netscape 7 on the same machine (same OS that is). Personally, I haven't had much luck with running ActiveX controls in Netscape and ended up not using them for one project. On another project we use ONLY IE (SOOO much nicer) but we still don't use ActiveX controls. If you're using ActiveX controls you're likely developing a business app, likely on an Intranet, in which case requiring IE is a perfectly viable option. -nerseus
-
You should be using FromArgb(...) when setting the color of your status bar. Are you converting to a number because you're storing something in the registry, a file, or someplace else? Otherwise you can set the color property on a control to another control's property... Either way, you should have the exact same color. The ARGB format contains everything there is to know about a color. One value used on multiple controls should not be any different. If used on separate machines, there might be a difference (for any number of reasons). -ner
-
Sorry I can't help with the multiple-columns question. I do know there are a TON of custom controls out there, many free and some include source code, that will allow it. Here's some more info on the Forms 2.0 "stuff" from Microsoft: -Ner
-
I've never seen this feature in a ComboBox, but that doesn't mean it doesn't exist. I do know you can do this in a ListBox. Here's some VB6 code that works by setting the TabStops. I tried this on a ComboBox with no luck, but maybe it will spark something... Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const LB_SETTABSTOPS As Long = &H192 Private Sub Form_Load() Dim Tabs(2) As Long Tabs(0) = 0 Tabs(1) = 50 Tabs(2) = 150 SendMessage List1.hwnd, LB_SETTABSTOPS, CLng(UBound(Tabs)) + 1, Tabs(0) List1.AddItem "hello" & vbTab & "world" & vbTab & "dan" List1.AddItem "hello" & vbTab & "world" & vbTab & "dan" List1.AddItem "hello" & vbTab & "world" & vbTab & "dan" End Sub Note that the tabstop numbers (0, 50, 150) are always in Pixels (as far as I can tell). -Nerseus
-
How to check if registry key exists
Nerseus replied to Winston's topic in Directory / File IO / Registry
You'll want to use the Registry object. For instance, to see if there's a key exists: Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Microsoft2"); if(key==null) Debug.WriteLine("Key does not exist"); else Debug.WriteLine("Key does exist"); To see if a value exists: Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Microsoft"); if(key!=null) { if(key.GetValue("hello")==null) Debug.WriteLine("Value does not exist"); else Debug.WriteLine("Value does exist"); } -Nerseus -
Well if they're all being opened modally the Owner property will still work. Since you need to create a new instance of each form every time you show it, each will get its own Owner property. -Nerseus
-
It's already part of C#... :) -ner
-
One more note... 1. You'll likely have to run the Windows Component Update, usually provided as a separate CD/DVD. When you pop in the .NET disk, it will tell you what you have to do first. 2. You can uninstall .NET, but I don't know how much I'd trust it (what it leaves behind...). As others said, they co-exist just fine so an uninstall would only gain you your Hard Drive space. 3. Knowing the syntax of the language will help a tiny bit, to get your feet wet. Other than that, everything is new (objects, forms, etc. etc.). 4. I wouldn't count on the wizard too much. If your project is anything above a student-assignment, I wouldn't trust it. Actually, I wouldn't even trust it to convert a simple school assignment :) -ner
-
lol... animation IS hard. I'd read through the MS samples (C++ for a skinned mesh, others work in C#). You can always tweak the code to cut out parts you don't care about. For the most part, you can also check out tutorials on DX8 as most of the functions and concepts haven't changed. -Nerseus
-
If you already have some, maybe you should stick with writing the code... and get the graphics later? :) But seriously, go code already! If it's just for you and testing, you can always search google for "chess bitmap" - I found about 8 gazillion hits that all look pretty good... -Nerseus
-
Can you show us what your connection string looks like right now? If you don't have one, try to use the Server Explorer to create a new database connection. The main things to input are the server name, database, user id, and password. You can then drag the item from server explorer onto a form and it will create a connection for you. I know Sybase used to be SQL Server but I don't know if they're compatable enough to use the SQL Server driver. I'd use the OleDb provider for now. -Nerseus
-
If you're using a DataSet, you can get at both the original data and the changed data. Perform you action (INSERT, UPDATE, DELETE) but don't call AcceptChanges. Use the DataSet to figure out what the action was and how to log it. -Nerseus
-
A Question an Class Design with ADO.NET
Nerseus replied to melegant's topic in Database / XML / Reporting
It looks fine, but hard to say what's best from an outsider's point of view :) If you are allowing anything to go through the properties SQLCmdText and SQLTable, you might as well declare them as protected and then your inherited class can see them, but outside classes cannot. -ners -
The short answer is no. You could write a trigger for each table and have it write to the audit log - that's fairly common. I've done what you mention (SELECT, DELETE, SELECT again) to handle auditing in the past. It's not bad, but it just "feels" wrong somehow... -Nerseus
-
Why do you need to store each form...? Can you not use the form's built-in Owner property? As long as you pass in "this" or "Me" when calling ShowDialog, the new modal window will have a reference to the opening form. -Nerseus
-
Here are a few links that you may find useful as well... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetperftechs.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetperftips.asp -Nerseus
-
A Question an Class Design with ADO.NET
Nerseus replied to melegant's topic in Database / XML / Reporting
Also, if you'd like a simple class that mimics the design of your Database, simple create a new DataSet object through the .NET wizard. When the blank yellowy screen comes up, drag on a table from your favorite database. You'll get a table-like view in the DataSet designer (the file has an XSD extension). Now, what you ALSO get is a handy-dandy class with all of the fields in the table (or proc, or whatever you used) exposed as properties. To see the auto-generated code, click on the "Show All Files" toolbar button in your Solution Explorer (the yellow toolbar button). Then expand the XSD file and you should see a .CS file (or .VB). In there is the code for a working class that mimics your database table. You can learn a lot from looking in there, as a starting point. If you make any changes to the code be aware that it will get overwritten if you make any changes to the XSD. When changes occur to the XSD, the .CS file is rebuilt to make sure it contains properties that match the XSD. Have fun! -Nerseus -
How to generate a PDF report using xsl??
Nerseus replied to anand's topic in Database / XML / Reporting
Were you asking me or...? You'll have to buy a license to use ActivePDF (thought they may offer a free trial). With it, they have lots of samples. I'm not sure if they've created a .NET version - when I used it, it was in VB6 (a COM DLL). The XSLT formatting objects (or whatever they're called) ARE for .NET, but I'll have to ask the guy who's using them who makes them if you want to know... -Nerseus -
Just use the Start method with on param, as in: System.Diagnostics.Process.Start("http://www.google.com") System.Diagnostics.Process.Start("c:\test.bat") (You might need to double up on the backslashes, can't remember if VB needs that or just C#). In the first line, the command will open Google in whatever the default browser is. This is preferred over using the name "iexplore.exe" in case that name changes or in case the user just hates IE and loves netscape. The second line just executes the file - can be EXE, COM, VBS, WSH, BAT, etc. - they're all considered executables, in a fashion. -Nerseus
-
What event are you using to see what the SelectedNode is? -Nerseus
-
You can use the CheckBox column type or control. I'm not exactly sure how to set this up from here (don't have .NET installed on this machine), but I can help in the morning if you can't get it. As far as displaying True/False, Yes/No, or anything custom, I've always done the conversion in my query (or stored proc for SQL Server). It seems easier, and using a UDF in SQL Server means changing the text is fairly easy. -Ner
-
I'm not sure what the problem is, but whenever I've seen VB6 highlight something "core" VB, such as Chr$ or Left$ function, it's usually a missing library. Check your project references and see if anything is listed as "MISSING: ...". Can't think of anything else - I run VB6 and .NET at work and at home and haven't seen any problems with project or EXE compatability. At work I use Both Win2000 Server and WinXP Pro. At home I use Win2000 Pro and sometimes Win2000 Server (a second build used for testing). -Nerseus
-
How to generate a PDF report using xsl??
Nerseus replied to anand's topic in Database / XML / Reporting
I don't know about Crystal... We are trying out two products that handle XSL-FO right now. I can get the names if you like. So far, it's been pretty straightforward and the resulting PDFs are perfect. In the past, I've used ActivePDF (another 3rd party tool) to create PDFs. They were the best of the 3 or 4 I tried out, but that was about 2 years ago, give or take. There is no built-in support (in .NET) for PDF generation. Last I remember (this is kind of vague I know :)), to generate PDFs required a license from Adobe or you could use a 3rd party tool that was Royalty Free (because they paid Adobe). Good Luck! Be sure and let us know what you choose, if you figure something out :) -Ner -
Matches here no problems... Instead of using a picturebox, can you verify that the saved BMP matches the background color of your form? Take a screenshot of your form and get it next to your saved bitmap in your favorite paint program to compare. I can't imagine why they would be different... -Ner
-
To be able to see the public field SomePublicData, you'll have to cast the ActiveMdiChild property to the exact class type of the form you're referencing. In .NET, all forms inherit from a generic "Form" class, which is what ActiveMdiChild exposes. Your form adds a bunch of functionality to the base Form class, such as your SomePublicData variable. So even though it's public, someone with a reference to a generic Form object can't see it. If your child form's class name is frmChild then use this code: DirectCast(Me.ActiveMdiChild, frmChild).SomePublicData (at least I *think* that's right in VB.NET... more of a C# guy :)) If you're not sure what the form is (because you have multiple child forms, each based on a different class), you can check the ActiveMdiChild form to see what type it is and cast to the appropriate type. OR, if all of you child forms need this variable called "SomePublicData" then you could create an Interface and have each child form implement that interface. Then the MDI Parent form could use DirectCast on the ActiveMdiChild form to cast it as the interface, which exposes whatever it is you need. Let us know if you need help with the second option :) -Nerseus