|
|
How do you make a credits screen which has for example a picturebox or something... The idea is just to make a box where text (or also pictures) scrolls down... Does anybody got an idea on how to do this???
Thnx, and remember VB6.0!!!
(¯`·._.·[eRiK]·._.·´¯)
|
|
|
|
|
simplest way to do it is probably to have a huge group box. in the group box you place your pictures and labels that you want on your credits. remove the border of the group box and use a timer to make it scroll up (decrease the .top property of the group box) slowly.
edit:
oh ya.. this is vb.NET.. u said vb6. well you CAN do this in vb6, of course. only thing is that i dont think group boxes are called that in vb6, only vb.net. so check out vb.net to see what a group box is. it looks just like a big label, with a border and a caption at the top left of the border.
|
|
|
|
|
I'm calling a method from myclass using a thread.
How could I catch the exceptions thrown from this thread?
Try
Dim x As New MyClass
Dim obj as new CControlObject
obj.param1=1
obj.param2=2
Dim TPool As System.Threading.ThreadPool
TPool.QueueUserWorkItem(New System.Threading.WaitCallback _
(AddressOf x.dowhatever), obj)
Catch ex As Exception
MsgBox("Error: " & ex.ToString)
End Try
|
|
|
|
|
How you have this setup won't work like you want. Your code, as it is now, will only catch exceptions thrown during the Thread setup and start. It won't catch exceptions that happen inside that new thread.
Exceptions caught with Try/Catch blocks won't cross thread boundries. Since the code on your main thread can be anywhere when an exception on a second thread is thrown, there is no way to capture an exception using a Try/Catch block. An alternative method for capturing exceptions on seperate threads is to have your threaded code in a class that can raise events. Then, if an exception does occur, try/catch blocks in your threaded code can raise an error event and send the exception data back to your main code through an event handler. That way, all of your error handling code for your threaded component can he handled in one place.
RageInTheMachine9532
|
|
|
|
|
Hi
I have posted this problem before, it is about embedding images or icons into your exe. I have been told to use an image list or changing the image/icon to embedded resources. But the code to retrieve them doesnt quite work. Can any body provide code to retrieve the image/icon back from changing it into an embeded resource or from using an image list.
Thanks
Vu
|
|
|
|
|
First, lookup 'ResEditor' in the Visual Studio documentation. You'll have to compile this little tool and use it to create a .resources file with your image information in it. Simple Add an image, give it a resource name, then click on the little '...' button and point it at image file that it is going to represent. Keep adding names and resources... then save this file as a .resources file in your project folder.
Next, add the .resources file to your project in the Solution Explorer.
Then in your code, you can use something like this: (This is the initialization code for a component I'm writing)
Private m_img_LightOn As Image
Private m_img_LightOff As Image
#Region " Windows Form Designer generated code "
.
.
' Load our internal resource files
Dim thisAssembly As System.Reflection.Assembly = Me.GetType.Assembly
Dim resManager As New System.Resources.ResourceManager( "BinaryDisplay.BinaryDisplay", thisAssembly )
m_img_LightOn = CType(resManager.GetObject("BMP_LIGHTON"), System.Drawing.Image)
m_img_LightOff = CType(resManager.GetObject("BMP_LIGHTOFF"), System.Drawing.Image) End Sub
RageInTheMachine9532
|
|
|
|
|
I am trying to convert a VB6 program to VB.NET. The problem I am having is trying to change the active sheet of an EXCEL workbook to coincide with the data I need for my program. I have 6 sheets in EXCEL that I need to get data from at different times. I have tried all of the sample code from various books and even Microsoft and the only worksheet that I am able to retrieve data from it the sheet that is active when EXCEL is closed or saved.
Any help would be greatly appreciated.
|
|
|
|
|
This seems to work:
Dim sheet As Excel.Worksheet = xl.Worksheets.Item("Sheet2")
sheet.Activate()
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
If you could, would you look at my post:
VB.NET Excell Cell Formatting
I am 1 week from graduating and my senior project is due.
I am having a problem with 1) excel's handling of text, 2) excels non-column autosizing
I would appreciate any insight you may be able to provide.
Regards,
Erik J. Long
|
|
|
|
|
Hi,
I am developing a Windows.Forms app. I am using a multi tier architecture with databinded strongly typed datasets . I am using a data access component called Facade where I have a method:
public Sub LoadCompany(ByVal companyID as Integer, ByRef ds as CompaniesDataSet)
ds.Clear()
...code to set the parameter in the select command
DACompanies.Fill(ds)
End Sub
It seems that ds.Clear() takes more and more time to complete , from a few miliseconds at start to 4-5 seconds after 100 method invokes.
Anyone has an answer to this?
Thank you,
Dan Bunea
|
|
|
|
|
hi,,
How to automatically install Mdac along with my software ? I have downloaded mergemodules for mdac,but it doesnt work, i.e. its not getting automatically installed... how to do it? When I attach Mdac.msm merge module in my setup project and see the no. of files, it shows (none), i.e. the list is empty..
thanks
het
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
In Visual Basic 6 you could add descriptive text to your object procedures by using the “Procedure Attributes” dialog. Descriptive text would then appear in the Object Browser.
How can I add descriptive text to my object procedures (methods) in VB.Net and have it appear in the Object Browser and in the Intellisense Pop-Ups. (Like different text for overridden methods.) I suspect this is done using attributes but 4 ½ hours in the MSDN has only served to confuse the issue even further. If possible, please include some source code showing how it is done. Thanks to anyone that can provide a solution to this problem.
|
|
|
|
|
The VB compiler natively supports adding descriptions using the Description attribute. These will appear in the Object Browser and below the Properties box in the bottom right corner of the IDE, but will NOT show up in Intellisense. For this, you have to use a plug-in like VBCommenter. You can find that here[^].
An example of the Description attribute:
<Category("Appearance"), _
Description("Set the number of LEDs to display."), _
DefaultValue(4), _
Bindable(True)> _
Public Property SizeInBits() As Integer
Get
Return m_SizeInBits
End Get
Set(ByVal NewValue As Integer)
If NewValue < 1 Or NewValue > 32 Then
Throw New ArgumentOutOfRangeException("SizeInBits", "Value must be between 1 and 32.")
Else
m_SizeInBits = NewValue
OnSizeInBitsChanged(EventArgs.Empty)
If m_Value >= (2 ^ m_SizeInBits) Then
m_Value = 0
OnValueChanged(EventArgs.Empty)
End If
End If
End Set
End Property
RageInTheMachine9532
|
|
|
|
|
Every time that I make a new project it has an error it says sub main not found. can someone help me figure this out cause it's really torqin' me off. Any suggestions or an answer to my problems would be much appreciated!
Sam
|
|
|
|
|
Is the problem that you have a Sub Main and you're still getting the message or that you want to know why you need a Sub Main?
Charlie
if(!curlies){ return; }
|
|
|
|
|
In a new VB.NET Windows Form project, if you remove the original Form1.vb and create a new form or main module, when you compile that project, it will tell you something like "Sub Main was not found in ProjectName.NewForm". Right-click on the project, click properties, then Common Properties, General, Startup Object, choose which thing will be your entry point for the application. In VB.NET, this will either be a Sub Main of a module or class, or a Form.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
The problem comes in because you either removed the Form1 object, deleted the file like you said in your previous post, or you renamed Form1 improperly. When you did this, the Startup Object automatically reverted to Sub Main, even if you don't have one, since you don't have a valid startup form any more. Then when you created a new form, the Startup Object stayed as Sub Main and won't revert back to a valid form automatically.
RageInTheMachine9532
|
|
|
|
|
Dave,
Did you mean to reply to the original poster? I thought my post read like an explanation...
JAK
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Sorry! It was meant for the original poster!
RageInTheMachine9532
|
|
|
|
|
Why not change the startup module in your project properties?
grtz,
Guus
|
|
|
|
|
I have two monitors on two separate video cards and would like to display a form on the second monitor automatically when launched.
I have form A launching on the first screen and form b launching at the same time. I want form B to go to the second screen.
Any help greatly appreciated!!
Thanks,
Bob
|
|
|
|
|
The upper left corner of the screen on the primary monitor is 0, 0. So, assuming both monitors are the same size (1280 by 1024, let's say), the upper left corner of the screen on a secondary monitor placed to the left of the primary would be -1280, 0. If the secondary is to the right of the primary, the upper left corner would be 1281, 0. If it's above it's 0, -1024 and so forth and so on...
frm2.StartPosition = FormStartPostition.Manual;
frm2.Location = new Point(-900, 200);
Charlie
if(!curlies){ return; }
|
|
|
|
|
In multimonitor environments use the DesktopLocation property instead of the Location property to correctly position forms.
|
|
|
|
|
hey guys i need xp style in my vb application. If you know of any free libraries available please reply.
Thanks a lot
|
|
|
|