Yeah, but the VB doc says "The Public keyword in the Dim statement declares elements to be accessible from anywhere within the same project, from other projects that reference the project, and from an assembly built from the project."
David Williams
Posts
-
What am I doing wrong with Public? -
What am I doing wrong with Public?This doesn't work. I thought declaring a variable as public in a class made it global. Public Class Form1 ... Public i as integer Private Sub Form1_Load(... i = 1 End Sub End Class Public Class Form2 ... Private Sub Form2_Load(... Dim j As Integer j = i :confused: compiler says i is undefined End Sub End Class
-
How do you print a project in NETIn VB 6, as I recall, you could print an entire project with one Studio command, set the header, etc. Now, do I have to print each file and class seperately? Can't I customize the header, at least?
-
This control array should work, right?Thanks for the reply. But I'm new to .NET. If you mean, have the main form inherit from System.Windows.Form.IContainerControl it doesn't work. At least I get an error that says classes can inherit only from classes.
-
This control array should work, right?Thanks, works pretty good. If I want to add the control array to a panel instead of a form, how would I declare the control? assuming a Panel1 on the main form, Dim ControlArray as ButtonArray(Panel1) 'doesn't work since Panel1 is not a "form" container
-
This control array should work, right?Thanks, works pretty good. If I want to add the control array to a panel instead of a form, how would I declare the control?
-
This control array should work, right?I know .NET is different than 6 wrt control arrays. But shouldn't I be able to capture the CLICK on the following (fragment)? Dim contArray(2) as Button for i = 0 to 1 contArray(i) = new Button contArray(i).tag = i controls.add(contArray(i)) next i ... private sub contArray_CLICK (...) or something that lets me get the tag or index of the button clicked. -David
-
Playing raw audio samplesHow do I? Or, to be a little more precise, I would like to suck homemade audio samples from an buffer (e.g., noise might be a gaussian distribution of integers between + -32K)and feed them at the right rate to a soundcard (audio device) for real-time play. (I'm not trying to play an existing, saved wav file.) A simple application would be a VCO (oscillator with a slider controlling the frequency). In the .net world, is this done by DirectX? By the WINAPI? wavePlay? Magic? Not at all? Background note: a wavetable might contain one complete waveform of a sample, and the buffer might have as many repetitions of the sample as maching performance allows.
-
Help reading a binary fileThis works for little endian. Will it work for big endian if I call it thus: 16IntURead() ;)
-
Help reading a binary fileNo, not simple. Gunnerson's BinaryReader works, but for little endian, not big. :((
-
Create An "add-in-able" ApplicationHow tightly coupled do you want the add-ins? Photoshop, I believe, uses a type of plug-in where, if a function (filter, in this case) in the right folder on startup, it is made available to the app. But I don't know what kind of internal interface it uses.
-
Help reading a binary fileYeah, I tried the deserialize and found it needed a header. Just to see what it needed, I serialized a 10 byte binary file and found the binary formatter put 28 bytes of header up front. Oh, well. lippie's solution works. Thanks for the response, though.;)
-
Help reading a binary fileYep. This works, and you do have the bit ops correct. Thanks:)
-
Help reading a binary fileI need to read a binary file into a ushort array. The file was created with another app, and just consists of two bytes per ushort (big endian). FileStream.Read will get the bytes in OK - as bytes. I'd like to read them in directly to ushort. Sounds simple. Is it?