|
Hi
How can i create a setup file that installs required file if required by the operating system like .Net framework 3.0, 3.5 and like sql 2000 or 2005 .ldf and .mdf files.
I donot understan where to place these files in the setup so that it installs automatically on the specified location and i donot have to copy these files and install them on the specified location.
Please help
regards
|
|
|
|
|
Hi again,
I assume you have created a Windows Forms application, so to include your pre-requisites such as .Net Framework 3.0 or 3.5 you need to go to solution explorer, right click on your project and select Properties. On the tab page that comes up select the Publish tab, then click the Prerequisites button. A dialog box should come up allowing you to select which Prerequisites you want included in the setup. If you want to include the Prerequisites in the same Setup folder as the application setup then tick the radio button Download prerequisites from same location as my application and click OK. This will ensure your selected prerequisites are included with your application setup program. To install extra files such as text or database files etc in a specific location on the target machine, you need to right click your SETUP project in solution explorer and select File System. Under the tab page that comes up highlight File System on Target Machine , and in there you can create folders as necessary, and include whatever you like in those folders, and these will be created on all mechines on which your application is installed.
One thing that you need to think about, and that is Windows permissions, especially on Vista and Windows 7 machines, as the user who installs the application will probably not have full admin privileges therefore it is always better to use Windows default folders where possible.
Hope this helps
Happy Coding
|
|
|
|
|
Hi
Please help, i want when any one clicks on my application icon first loads the splash screen then the login form and then the application. For this i want to use the timer control on the splash screen when the the condition is true that is 5 seconds then load the login form.
regards
|
|
|
|
|
Hi,
I'm writing a steganography app in vb.net, which hides one bmp inside another within the least significant bits.
I want to be able to hide/show the least significant bits to reveal the hidden image. At present this is done via 8 checkboxes. The current code works somewhat but when showing the bits to reveal the second image, the image is visible but is black with no colour information.
Heres an example of my current code to show/hide the least significant bits
Dim b1, b2, b3, b4, b5, b6, b7, b8 As Integer
Dim MaskByte As Integer
If cb1.Checked = True Then
B1 = 1
End If
If cb2.Checked = True Then
B2 = 2
End If
If cb3.Checked = True Then
B3 = 4
End If
If cb4.Checked = True Then
B4 = 8
End If
If cb5.Checked = True Then
B5 = 16
End If
If cb6.Checked = True Then
B6 = 32
End If
If cb7.Checked = True Then
B7 = 64
End If
If cb8.Checked = True Then
B8 = 128
End If
MaskByte = b1 + b2 + b3 + b4 + b5 + b6 + b7 + b8
For x = 0 To Image.Length - 1
If x <= 54 Then
MaskedImage(x) = Image(x)
Else
MaskedImage(x) = Image(x) And MaskByte
End If
Next
CreateBitmap(MaskedImage)
Image() is the opened bitmap converted to a byte array.
It's strange as i can see the outline of the second image, but it contains no colour.
Any help would be much appreciated. Thank You
|
|
|
|
|
Hi,
I'm not sure what you are doing here. Some comments:
1.
you don't need all the b1, b2, b3, b4, b5, b6, b7, b8; you could add to MaskByte right away.
2.
your image may have 4 components: RGB+alpha, so you may be manipulating the alpha/transparency too.
3.
what is the magic about byte value 54?
4.
all your code does is bringing every byte closer to zero; and all-zero is black.
5.
you probably want something like:
For x = 0 To Image.Length - 1
If (x MOD 4) = 0 Then
Image1(x)=Image(x)
Image2(x)=Image(x)
Else
Image1(x)= Image(x) AND MaskByte
Image2(x)= Image(x)-Image1(x)
End If
Next
which still brings things closer to black, but at least it is separating two images.
|
|
|
|
|
Thanks for the reply
The aim of the checkboxes was to allow the user to see the image gradualy transform into the hidden one.
Byte 54 is the start of the bitmap data. Before this, the bitmap contains data such as the file size, resolution, number of colors utilised etc..
I've tried the suggestion but still can't get it to work. The hidden covert image has been encoded into the 4 least significant bits of the original image, so i just need to apply a filter to show the hidden image. I'm just unsure how to acheive this.
I did find some code in matlab that works to extract the hidden image, but i don't now how to convert it to vb.net code.
n = number of bits to utilise i.e. 4 LSB
Stego = Bitmap Image that contains the hidden image
Extracted = Hidden image extracted fromt he Stego bitmap
<br />
Extracted = uint8(bitand(255, bitshift(Stego, 8 - n)));<br />
Thanks for your help
|
|
|
|
|
OK, now I see what you are after, I think.
The one image basically consists of image1(x) = image(x) AND &HF0 i.e. the high nibble of every byte (except for the bitmap header, and possibly the alpha channel).
The other image is stored in the lower nibble, but needs a multiplication factor, so that would be
image2(x) = 16*(image(x) AND &H0F) .
[EDIT]BTW: multiplying by 16 is the same as shifting left by 4, as in y << 4 [/EDIT]
And you can morph from one to the other by having a mix of the two; say alpha is a number between 0 and MAX; then you could do image3(x) = ((MAX-alpha)*image1(x) + alpha*image2(x))/MAX . Obviously when alpha is zero this yields image1, and when alpha equals MAX it yields image2. Pick MAX = 16 or 256 or something like that.
|
|
|
|
|
Thanks for your help ! , thats exactly what i'm after. I can now sucessfully extract the hidden image.
Now finished the program, Thanks for the help Luc Pattyn
modified on Friday, July 2, 2010 7:28 PM
|
|
|
|
|
I am trying to create an application that can connect to a database on a remote server. If anyone knows how to achieve this or has any good reading material please could you let me know?
Any help is much appreciated.
McGann
|
|
|
|
|
Mc--Gann wrote: remote server
By this I assume you mean 'Not on the same Local Area Network'
Also, what type of database are you trying to connect to?
Steve Jowett
-------------------------
Real programmers don't use PL/1. PL/1 is for insecure momma's boys who can't choose between COBOL and Fortran.
|
|
|
|
|
Correct its over the web. It's a MSSQL database
ASP all the way
|
|
|
|
|
You can connect to SQL over internet. Check out ConnectionStrings.com for connection string.
|
|
|
|
|
thanks for the help
ASP all the way
|
|
|
|
|
You should be aware of firewall inparticular the UDP ports. MS SQL Server uses port 1440 as standard but is othen changed. Assuming the port is 1440 then in your connection string you will need to specify the port along with the server ip address, for example :
Data Source=123.123.123.123:1440;Initial Catalog=MyDatabase;User ID=MyUserId;Password=MyPassword
Steve Jowett
-------------------------
Real programmers don't use PL/1. PL/1 is for insecure momma's boys who can't choose between COBOL and Fortran.
|
|
|
|
|
Who in their right mind exposes a SQL Server directly to the Internet?? That's insane!
|
|
|
|
|
Fasthosts do and that seems quite secure to be honest, I can access it using management studio from my PC easily which makes for simple maintenance.
Phil
Software Developer
http://www.yorkshirehumberit.co.uk
|
|
|
|
|
I have developed a software using visual basic. It is designed to run in a network. I deployed the software on the application server and try running it on the same computer and it worked fine. I tried accessing it on my development pc and it worked fine as well, but when i tried accessing it to local computers/ clients, it gives me an assertion error and i don't know what to do with it.
I have three (3) assertion errors.
Debug Assertion Failed!
File : dbgdel.cpp
line 47
Expression: _BLOCK_TYPE_IS_VALID(phead->nBlockUse)
Debug Assertion Failed!
File: dbgheap.c
line: 011
Expression: crtIsValidHeappointer(pUserData)
Debug Assertion Failed!
File: dbgheap.c
line: 1017
Expression: _BLOCK_TYPE_IS_VALID(phead->nBlockUse)
I have until Friday to make my software work before it goes live, so i am in urgent need of help..
Any response will be deeply appreciated. Thank you
|
|
|
|
|
"dbgdel.cpp", "dbgheap.c", those are C files, not Visual Basic. Can you copy/paste the part of the source that's throwing the assertion?
I are Troll
|
|
|
|
|
I have a really weird problem. I had to make some adjustments to a VB6 application. So i installed Visual Studio 6 (with SP6) on my Windows 7 pc, i downloaded the project though Visual SourceSafe and after changing some filepaths in the projectfiles(had to be done because it had some absolute references in it) and recompiling some ocx file(because of a more logic file-location) i got the project to work on my computer.
I made my changes i checked-in the project again. Now a college of mine wanted to see the changes on his computer(with had a already working copy of the source). He got the latest version of the source code and opened the project. He got a error about visual basic not finding the ocx file i recompiled, but after registrating the ocx file he could open the project without a problem.
After hitting F5 he got the following error message: "System Error &H80004015 (-2147467243). The class is configured to be executed when a security-ID is different from the caller" << now don't know about the error message, i had to translate it, the original message was: De klasse is geconfigureerd om te worden uitgevoerd als een beveiligings-ID dat verschilt van de beller < witch is not correct dutch
His Pc is a Windows XP computer and also has Visual Studio 6 (SP6) installed. Can somebody please help me out with this really weird problem.
|
|
|
|
|
Did you unregister the old ocx and register the new one? (using regsvr32.exe )
I are Troll
|
|
|
|
|
Yes i did, but that didn't work... So i removed all registry entries that pointed to the ocx and registrated the new one. That didn't work too.
My last hope was a system restart, did it, and YES it works again!!!
Don't know what fixed the problem, but my solutions where:
- Recompiling the ocx on the other computer.
- Registrating all dll/ocx files again.
- Removed all registry entries of the ocx file.
- Registrated the ocx again.
- Restarted the computer.
|
|
|
|
|
I have a ContextMenuStrip that I am showing programmatically in response to a button being clicked. Everything works as expected, except that the Items in the menu do not respond to being moused over. Whether the mouse button is up or down, mousing over the menu has no visible effect, and releasing the mouse button does not select an Item, as expected. Performing a full click on an Item does still activate the Item, however.
Here's my code for showing the ContextMenuStrip:
Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
MyBase.OnMouseDown(e)
If Enabled Then
m_MouseDown = True
If m_State > ButtonState.MousePressed Then
m_State = ButtonState.MousePressed
End If
Invalidate()
If DropDown IsNot Nothing AndAlso DropDown.Items.Count > 0 Then
If ShowMenu Then
ShowMenu = False
ElseIf arrowRect.Contains(PointToClient(MousePosition)) Then
ShowMenu = True
m_MouseHeldWhileOpened = True
DropDown.Capture = True
End If
End If
End If
End Sub
Protected Property ShowMenu() As Boolean
Get
Return m_showMenu
End Get
Set(ByVal value As Boolean)
If value <> m_showMenu Then
m_ShowMenu = value
If m_ShowMenu Then
m_DropDown.Show(Me, GetDropDownSpawnPoint, DropDownDirection)
m_State = ButtonState.MenuUp
If m_DropDown.ClientRectangle.Contains(PointToScreen(MousePosition)) Then
m_DropDown.Capture = True
End If
Else
m_DropDown.Close()
ElevateState()
End If
End If
End Set
End Property
I have tried a number of different ideas to get the menu to respond correctly, some of which attempts are still evident in the code here. If any help would be forthcoming, it would be greatly appreciated - nobody else on Google seems to have experienced this problem.
Thank you in advance for any help you can offer.
|
|
|
|
|
What are you trying to do that you have all this code in the mousedown events?
Whenever i have used context menu's in the past i haven't gone to all that trouble.
For example, the code below is handles on a button.click, It creates a new context menu, adds to click handlers for the menus events and shows the menu next to the button.
Private Sub ButtonSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSave.Click
Dim theMenu As New ContextMenuStrip
theMenu.Items.Add("Export to XML", MenuExportXML.Image, AddressOf MenuExportXML_Click)
theMenu.Items.Add("Export to CSV", MenuExportCSV.Image, AddressOf MenuExportCSV_Click)
Dim p As New Point
p.X = ButtonSave.Width
p.Y = ButtonSave.Top
theMenu.Show(ButtonSave, p)
End Sub
|
|
|
|
|
Hi,everyone,now I need to write some texts to some cells with VB.NET ,sometimes I need the texts wrote in two lines or three lines in one cell.Just like below:
"ABCDEFG" ,in the cell it should like
ABC
DEFG
That is the question:could I control it with VB.NET?
Need some help or sugestion,Thanks a lot!
|
|
|
|
|
you did not say on what surface, in what Control, where at all this is going on.
Some Controls simply accept multi-line text and perform wrapping themselves; most of those also understand Environment.NewLine; some have a property you'd have to set true before they accept multi-line text; and some don't at all.
PS: all of them would tell you in the documentation, all it takes is to go to the appropriate page; I can't provide a link as I'm in the dark of the very nature of your cells.
|
|
|
|
|