-
Jan 11th, 2023, 01:54 PM
#1
Thread Starter
New Member
I need help writing code
I want to manually view a file and not automatically view all files
ListView1_MouseDoubleClick
Code:
private void ListView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
try
{
var di = new DirectoryInfo(Application.StartupPath + "/PKGS");
// ext/icon lookup
var exts = new List<string>();
ImageList1.Images.Clear();
foreach (FileInfo fi in di.EnumerateFiles("*.pkg"))
{
ListViewHitTestInfo info = ListView1.HitTest(e.X, e.Y);
ListViewItem item = info.Item;
if (item != null)
{
var pkgfile = PKG.SceneRelated.Read_PKG(fi.FullName);
pbPkgicon.Image = BytesToBitmap(pkgfile.Icon);
pbPkg.BackgroundImage = BytesToBitmap(pkgfile.Image);
MessageBox.Show(lblPackageInfo.Text = pkgfile.PS4_Title + "\n" +
pkgfile.PKG_Type.ToString() + "\n" + pkgfile.PKGState + "\n" +
pkgfile.Param.TitleID);
}
else
{
}
}
}
catch (Exception ex)
{
Interaction.MsgBox(ex.Message, MsgBoxStyle.Critical);
}
}
Error explanation video
https://mega.nz/file/hewUhCwQ#Tgr6ou...QuCLuvOYt4im3A
Download Link
PKG View List-source
https://bit.ly/3ILACeB
Thanks 🌹
-
Jan 11th, 2023, 02:06 PM
#2
Re: I need help writing code
-
Jan 11th, 2023, 02:58 PM
#3
Re: I need help writing code
We ALL need help writing code. The skill is learning how to obtain targetted help and you don't get that with a uselessly worded generalisation as the subject of your post.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
Jan 11th, 2023, 09:14 PM
#4
Re: I need help writing code
Originally Posted by yereverluvinuncleber
We ALL need help writing code. The skill is learning how to obtain targetted help and you don't get that with a uselessly worded generalisation as the subject of your post.
I have to agree. I came here to help but I don't really know what your problem is because you haven't explained it. I expect a FULL and CLEAR explanation of the problem to be provided in the post and I'm not the only one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|