|
Hello coders ^^
+++++ ----- +++++
I work on my 1st project and after the project is done, i made a setup file to be able to install it on different PC.
My problems are:
****************
1- I need to specify the paths for the (.jpg & .wav) files that were used in creating the project to be compatible with the setup file location (which is different from PC to another)
2- I use arabic letters in creating the project, so I can't proceed to install step and I get 3 errors:
A- "Error: -7184: the filename column of the file table includes characters that aren't available on code page 1252 "
B- "Error: -7184: the value column of the MsiAssemblyName table includes characters that aren't available on code page 1252 "
C- "Error: -7185: the English (united States) translation for string identifier IDS_SHORTCUT_DISPLAY_NAME1 includes characters that aren't available on code page 1252 "
Can anyone help about that issue ?
|
|
|
|
|
In general you should avoid using non-ASCII characters for file names and resources. If you still want to use such, you should store them as Unicode strings and ensure that the setup supports Unicode.
For better help you should tell us which kind of setup tool you are using.
|
|
|
|
|
I use install shield 2015
|
|
|
|
|
I'm not using InstallShield but it should support Unicode. A quick web research shows that it is controlled by the "Setup Launcher Type" option which can be ANSI or Unicode.
|
|
|
|
|
How do I restrict a Listbox to 4 entries?
Thanks for looking.
Solved, found this
Listbox1.Items.Count
modified 2-Feb-18 13:50pm.
|
|
|
|
|
The ListBox doesn't support such limitations. You'd have to create your own ListBox and add that functionality.
|
|
|
|
|
It may not be supported but using this
If LstMat1.Items.Count = 4 Then it did what I required.
|
|
|
|
|
Seriously, I thought you were writing this for other developers to use. Of course, it's that easy if you're the only one doing this for a single ListBox.
If you're looking to reuse this in multiple places, you'd have to make your own version of the ListBox.
|
|
|
|
|
Hi Dave,
I only ever code for myself, it's a hobby nothing more, this program is for the bowling club that I attend on Wednesday nights, we have 4 mats and when your game is finished the names of the 4 players go back in to the pool and the next 4 players use the mat you've just left.
Below is the complete code, not that you need it but you can see what I did, no comments as it's only for me to play with.
Public Class Form1
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
Static Fillup = 1
Select Case Fillup
Case 1
LstMat1.Items.Add(TextBox1.Text)
TextBox1.Text = String.Empty
If LstMat1.Items.Count = 4 Then
Fillup = 2
End If
Case 2
LstMat2.Items.Add(TextBox1.Text)
TextBox1.Text = String.Empty
If LstMat2.Items.Count = 4 Then
Fillup = 3
End If
Case 3
LstMat3.Items.Add(TextBox1.Text)
TextBox1.Text = String.Empty
If LstMat3.Items.Count = 4 Then
Fillup = 4
End If
Case 4
LstMat4.Items.Add(TextBox1.Text)
TextBox1.Text = String.Empty
If LstMat4.Items.Count = 4 Then
Fillup = 5
End If
Case 5
LstNames.Items.Add(TextBox1.Text)
TextBox1.Text = String.Empty
End Select
End If
End Sub
Private Sub BtnMat1_Click(sender As Object, e As EventArgs) Handles BtnMat1.Click
Static num = 3
For clearLb = 0 To 3
LstNames.Items.Add(LstMat1.Items(num))
LstMat1.Items.Remove(LstMat1.Items(num))
num = num - 1
If num = -1 Then
For fillLb = 0 To 3
LstMat1.Items.Insert(0, LstNames.Items(0))
LstNames.Items.Remove(LstNames.Items(0))
num = 3
Next
End If
Next
End Sub
Private Sub BtnMat2_Click(sender As Object, e As EventArgs) Handles BtnMat2.Click
Static num = 3
For clearLb = 0 To 3
LstNames.Items.Add(LstMat2.Items(num))
LstMat2.Items.Remove(LstMat2.Items(num))
num = num - 1
If num = -1 Then
For fillLb = 0 To 3
LstMat2.Items.Insert(0, LstNames.Items(0))
LstNames.Items.Remove(LstNames.Items(0))
num = 3
Next
End If
Next
End Sub
Private Sub BtnMat3_Click(sender As Object, e As EventArgs) Handles BtnMat3.Click
Static num = 3
For clearLb = 0 To 3
LstNames.Items.Add(LstMat3.Items(num))
LstMat3.Items.Remove(LstMat3.Items(num))
num = num - 1
If num = -1 Then
For fillLb = 0 To 3
LstMat3.Items.Insert(0, LstNames.Items(0))
LstNames.Items.Remove(LstNames.Items(0))
num = 3
Next
End If
Next
End Sub
Private Sub BtnMat4_Click(sender As Object, e As EventArgs) Handles BtnMat4.Click
Static num = 3
For clearLb = 0 To 3
LstNames.Items.Add(LstMat4.Items(num))
LstMat4.Items.Remove(LstMat4.Items(num))
num = num - 1
If num = -1 Then
For fillLb = 0 To 3
LstMat4.Items.Insert(0, LstNames.Items(0))
LstNames.Items.Remove(LstNames.Items(0))
num = 3
Next
End If
Next
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
LstNames.Items.Remove(LstNames.SelectedItem.ToString)
End Sub
End Class
|
|
|
|
|
A gentle suggestion...
Even though you are the only user, I still advise you to rename your textboxes to more meaningful names than the default TextBox1 - get into good habits
|
|
|
|
|
Simple; add a post-it to the monitor that says "don't add more than four in THE listbox".
Download the UX-guide from MS (its free) and read why you are using the wrong control, and which one you should be using instead. I'll bet it will point out checkboxes.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Tried adding post-it note to monitor but it still didn't work?
Just to recap:--
I need 5 Listboxes one Main Listbox (MLB) and four others LB1, LB2, LB3 and LB4.
After entering names in a Textbox and pressing enter the first name goes in to LB1 so does the 2 name, the 3rd and the 4th. The 5th name goes in to LB2 so does name 6, 7 and 8. LB3 gets the next 4 and LB4 gets the next four. Any other names that get entered go in to MLB.
Under each LB is a button and when pressed the four names in that LB get added to the bottom of the MLB and the top 4 names in the MLB go in to LB1, 2, 3 or 4 depending on which button under which LB was pressed.
Despite all the help and advice offered I have this working exactly as I want with no errors.
So it shows, that sometimes, the best help is when your help yourself.
And if it still proves difficult then visit a site that offers constructive help and advice.
|
|
|
|
|
MallardsReach wrote: So it shows, that sometimes, the best help is when your help yourself.
And if it still proves difficult then visit a site that offers constructive help and advice. My advice remains unchanged, as well as the verdict, as non-typical use of common controls is confusing to typical end-users.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
That's good to hear then, as I'm the only end user!
|
|
|
|
|
MallardsReach wrote: That's good to hear then, as I'm the only end user! Haha, in that case your helpdesk will be prepared for any questions from the users, and no problems handling complaints
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy, you can always make me smile.
May not always understand the advice but always get the humour. (English Spelling)
|
|
|
|
|
Hello coders ^^
I need to make a setup file for my project.
So, I installed install shield.
But nothing changed after installation and I could not make any setup files
Any ideas about any other progs that should be installed with install shield ?
Thnx all <3
|
|
|
|
|
Member 13622627 wrote: So, I installed install shield.
But nothing changed after installation and I could not make any setup files If nothing changes, then you did not install it.
Member 13622627 wrote: Any ideas about any other progs that should be installed with install shield ? No, the setup contains all the stuff that you need.
Did you download from some generic "tools" site, or from a regular location? If the first, then check your computer for malware.
InstallShield Express Edition - Free Trial[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes, i installed a modified version bcoz the original version gives me error message saying (install shield 2015 requires MVS 2010, 2012, 2013 Or 2015 professional edition or greater to be installed on the machine)
maybe this is the problem
Any advice about it ?
|
|
|
|
|
A "modified" version sounds like a version with malware. Go to their site and download the trial, it doesn't have those requirements.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thnx Eddy, 😘
Problem solved
I downloaded VS 2012 professional instead of express edition.
So, install shield worked correctly
======[]======[]=======[]========
Now i have another issue
I need to make a setup copy of my finished project and while the user is installing the project, he should be asked about location of the files that i used to create the project bcoz I need to give the setup to my friend but when he runs the exe file, it gives an error as he can't find the files that were used in creating the project
Can u guide me to solve this issue? ?
|
|
|
|
|
If InstallShield is working correctly, then it will ask you where to install those files. I haven't used an InstallShield installer in years, but I doubt that they'll have removed that feature
Is your executable expecting files in a certain location? Did the installer throw an error, or did your executable throw an exception? If an exception, can you post the entire text, including stack-trace?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Maybe I can't explain my problem
But i will try explain another way
I use external .wav and .jpg files that are exist only on my pc
Now i need to copy my project to my friend's pc but he of course doesn't have my external files
Is there a way that i can copy these files inside the installation folder ?
|
|
|
|
|
You would normally add those to the InstallShield project and copy them to the same location as the executable. Problem is that you cannot assume that the path is the same as it is on your computer, so you can't hardcode those paths in code. The question was whether you did hardcode those paths
An alternative way would be to include those files as a resource in your executable, and to read the resources when needed. Adding them to the installer should be simpeler though.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks, I took ur advice and added the files to the resources and that did the trick.
I'm facing another problem now as i try to make the setup using install shield, it can't read the arabic letters and it produces error
Is there a solution for this issue except for changing Arabic letters inro English ?
|
|
|
|