|
I changed my code little bit
Private Sub RoomNameComboBox_SelectionChangeCommitted( _
ByVal sender As Object, ByVal e As System.EventArgs) _
Handles RoomComboBox.SelectionChangeCommitted
' Retrieve the sales information for the grid.
Dim RoomsString As String
Dim RoomDataRow As DataRow
Dim BedDataRow As DataRow
AroomsDataTier = New RoomsDataTier
AcottagesDataSet = AroomsDataTier.GetDataSet
RoomDataRow = AcottagesDataSet.Rooms.FindByRoom(RoomComboBox.SelectedValue.ToString)
BedDataRow = RoomDataRow.GetParentRow("BedsToRooms")
' Retrieve the ID of the selected store.
RoomsString = RoomComboBox.SelectedValue.ToString
CheckBox1.Checked = CBool(RoomDataRow!Jacuzzi)
CheckBox2.Checked = CBool(RoomDataRow!Private_Access)
CheckBox3.Checked = CBool(RoomDataRow!Fireplace)
TextBox1.Text = CDbl(BedDataRow!WeekdayRate).ToString("c")
TextBox2.Text = CDbl(BedDataRow!WeekendRate).ToString("C")
End Sub
now the error was
Object reference not set to an instance of an object.
|
|
|
|
|
Then you need to step through the code and find which object isn't being set correctly. My guess is that AcottagesDataSet.Rooms.FindByRoom(RoomComboBox.SelectedValue.ToString) isn't returning anything.
|
|
|
|
|
Dear All,
I have designed a JPG file and want to use in splash screen in my vb.net project. I have set this image in form's background image property. In this JPG file, the blank space is filled with white background by default. But I dont need to show this white background in splash screen. Someone told me that there is a way to do this job by using transparency key. I tried alot by setting form's transparency key to white and also form's back color to white, but it doesn't work. Can anyone help me...
Thanks
Ovais
|
|
|
|
|
The transparency key likely wont work for your image as the white is made of of several different shades of many colors. You probably would be best to just remove the white background from the jpg.Add an Alpha Channel to your image and clear out the white, if you don't have (or know you have) a program to do this, here are some instructions for doing it in GIMP which is a free editor.
http://weisbeek.freewebhostx.com/gimp/[^]
|
|
|
|
|
I'm not sure I'm right but JPEGs don't support transparency therefore try converting it to a PNG or GIF image and set the transparent colour in the colour pallet of the image.
Then set the image file as the background of the splash form and set the splash form transparency to the back color of the form.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
The image itself must support transparency, as has been said, you will have to save your image as a png or similar that supports transparency then make sure the transparent parts of the image really are transparent.
After that set the form transparency key and backColor to the same colour. I usually use Fuschia as it is to vile a colour to be used for real and instantly shows up if you made a mistake.
For more info on splash screens try any of the many articles here on code project eg. Creating a Splash Screen that runs without a message pump[^].
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
You can theoretically draw the image with transparency because you can use the ImageAttributes class to draw an image with a color range that is transparent. As others have said, JPEG is a lossy format, and your area of pure white will be turned in to blocks of various similar shades of white by the algorithm, that's why a range of whites would be needed. As was also said, PNG supports an alpha channel, which means .NET can just draw it with a transparent area.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I Create a Chart in WinForm But I Want to Create a Chart in Xtrareport With DataSource How I Use DataSource For Series in Xtrareport??
please send me a sample of Code
|
|
|
|
|
You should look for help in the Xtrareport documentation/forum...
|
|
|
|
|
You probably won't get a response to your question here.
Your bestter bet would be to ask in a forum dedicated to XtraReport, like the forums at DevExpress[^]. You know, the people who actually wrote XtraReport...
|
|
|
|
|
Hello please some body help me its urgent?
I m in trouble. While working on an VB6 application in Vss mode. i got system error. when i run this application captions of all buttons where gone. Can anybody help me? why this happens and how to get back the captions?
please Help??????????
|
|
|
|
|
VB6 - probably not, it is no longer a supported platform.
What is Vss mode?
I presume you are debugging the application not just running it from the exe.
I seem to remeber something like this happening, I have no idea how it was fixed, I'd close all other apps and try again, reboot if that does not work. I would get there is a problem between your app and windows.
|
|
|
|
|
VSS - Visual Source Safe.
And i had restart the system but problem not solved? m dont no? wat to do?
|
|
|
|
|
What is VSS mode? Are you referring to debugging the app inside the VB6 IDE ?
|
|
|
|
|
You should put VB6 in your subject, because it's been obsolete for so long, you'd need to work harder to attract people who still remember how they used to use it. Do you have the source code ? I assume so. Does the code set the text on the controls ? Have you tried running it on another machine ? It's either the case that your source code somehow lost all the text on the buttons ( in which case, you have source control to wind it back ), or something is broken on your computer, not your source code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi, I was wondering if anyone knew how to put your application into the msconfig startup folder using the registry. I tried using the following code but for some reason it isnt working for me. it will work when i debug, but when i publish the application it doesnt work.
Private Sub addstart()
registrykey = CreateObject("WScript.shell")
registrykey.RegWrite("HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\" & App, filepath)
End Sub
Private Sub removeStart()
On Error Resume Next
registrykey = CreateObject("WScript.shell")
registrykey.RegDelete("HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\PEM beta.exe")
End Sub
Is there a better way to do this?
Thanks
|
|
|
|
|
RyJaBy wrote: how to put your application into the msconfig startup folder
And just what do you mean by "msconfig startup folder"?? What do you mean by "it doesn't work"?
The Run key values are all command lines that execute only when a user logs in. The name/value pair you create in the Run key must have a unique name and its value must be a valid command line that would work just as if you copied it into the Start/Run box.
|
|
|
|
|
If you go to run and you type in msconfig you will get a window,"system configuration utility" that has a tab on it called startup. In the tab is all the applications that run when your computer starts up. When it was working, it would put the name of my application into this list on the startup tab, it does that when i am debugging. When i publish the application and install it on my computer, it doesnt write its name into that list when i tell it to.
|
|
|
|
|
That tab is just a compilation of the various startup locations that track which application should launch when a user logs in. Those include the Run keys under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER as well as the shortcuts that appear in "Documents and Settings\All Users\Start Menu\Programs\Startup" and "Documents and Settings\<user id="">\Start Menu\Programs\Startup".
Your code won't work for a list of reasons. The first of which is that you have On Error Resume Next in there and it's eating your error messages.
Your code should look like this:
Set wshShell = WScript.CreateObject("WScript.shell")
wshShell.RegWrite "HKCU\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\" & App, filepath
|
|
|
|
|
Remove the demon "On Error Resume Next" and you will be able to see what the problem is. Most probably, you have an access issue, the account under which the code runs must have permissions to modify the registry key.
|
|
|
|
|
Yeah, there's a lot more wrong with his code than access permissions to the Run key... I think I found at least 5 errors in his two lines of code.
|
|
|
|
|
Is going through the registry even a good way to try to have your application run on startup? Or should I be trying to find a different way to do this. Maybe is there a way to, using code, create a shortcut in the startup folder? and would you be able to delete this shortcut using code, so the user would not have to do anything except check a box? I would like the user to be able to select an option that would cause the application to start automatically.
Thanks
|
|
|
|
|
You're already doing it. You either put the shortcut in one of the four startup locations mention in my previous post, or you don't bother with it at all.
|
|
|
|
|
Thank you very much for your help.
|
|
|
|
|